README_LLVM = """
# The LLVM Compiler Infrastructure

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the [Clang](http://clang.llvm.org/) frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include:
the [libc++ C++ standard library](https://libcxx.llvm.org),the [LLD linker](https://lld.llvm.org), and more.

## Getting the Source Code and Building LLVM

Consult the
[Getting Started with LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm) page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the [Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide.

## Getting in touch

Join the [LLVM Discourse forums](https://discourse.llvm.org/), [Discordchat](https://discord.gg/xS7Z362), [LLVM Office Hours](https://llvm.org/docs/GettingInvolved.html#office-hours) or [Regular sync-ups](https://llvm.org/docs/GettingInvolved.html#online-sync-ups).

The LLVM project has adopted a [code of conduct](https://llvm.org/docs/CodeOfConduct.html) for participants to all modes of communication within the project.
"""


# 入参的repository_id为仓库的ID(未定义)，commit_id为commit_hash(必须是完整哈希值)
def get_repository_info(repository_id):
    return {
        "platform": "github",
        "name": "llvm/llvm-project",
        "readme": README_LLVM,
    }


def get_commit_info(repository_id, commit_id):
    # COMMIT_HASH=fc715e4cd942
    # https://github.com/llvm/llvm-project/commit/fc715e4cd942612a091097339841733757b53824
    # **comments格式** 仅考虑产生变更部分的注释，尽可能将单行注释合并成多行注释，格式可以再讨论。
    # {
    #    "文件路径": {
    #        "行号（变更后）": "单行注释内容",
    #        "起始行号-结束行号": "多行注释内容"
    #    }
    # }
    return {
        "info": "[CodeGen][MachineScheduler][NFC]Update some comments of scheduler (#74705)",
        "comments": {
            "llvm/include/llvm/CodeGen/SchedulerRegistry.h": {
                "67": "schedules nodes in source code order when possible."
            },
            "llvm/lib/CodeGen/MachineScheduler.cpp": {
                "750-752": "enterRegion - Called back from after crossing a scheduling boundary. [begin, end) includes all instructions in the region, including the boundary itself and single-instruction regions",
                "796-798": "PostMachineScheduler::runOnMachineFunction. This is a simplified driver that does not consider liveness or register pressure. It is useful for PostRA scheduling and potentially other custom schedulers.",
            },
        }
    }

